namespace NetduinoRobot.Common
{
    /// <summary>
    /// SerialPort is not compatible between normal .Net Framework and .Net MicroFramework
    /// So each project like to use the common read write package needs to implement this interface.
    /// This interface wraps a serial port instance and contains only methods which are in SerialPort available as methods or property
    /// Written by: Salvador Richter
    /// Appache License Version 2.0 
    /// </summary>
    public interface ISerialPortWrapper
    {
        bool IsOpen();

        void Open();

        void Close();

        int BytesToRead();

        int Read(byte[] cmdBuffer, int cmdBufferOffset, int readLength);

        void Write(string s);
    }
}
